//
// Created by 沈航烨 on 2024/10/31.
//

#ifndef VIDEORENDER_H
#define VIDEORENDER_H
#include "ImageDef.h"
#define VIDEO_RENDER_OPENGL             0
#define VIDEO_RENDER_ANWINDOW           1
#define VIDEO_RENDER_3D_VR              2
#define VIDEO_RENDER_SDL             3

extern "C" {
#include <libavutil/frame.h>

}
class VideoRender {
public:
    VideoRender(int type) {
        m_RenderType = type;
    }
    virtual ~VideoRender() {}
    virtual void Init(int videoWidth, int videoHeight, int *dstSize) = 0;
    virtual void RenderVideoFrame(NativeImage *pImage) = 0;
    virtual void RenderVideoFrame(AVFrame *pImage) = 0;
    virtual void UnInit() = 0;
    int GetRenderType() {
        return m_RenderType;
    }

private:
    int m_RenderType = VIDEO_RENDER_ANWINDOW;;

     VideoRender *m_VideoRender = nullptr;


};
#endif //VIDEORENDER_H
